/*
 * Copyright 2010 Cedric Priscal
 *
 * This file is part of stupid-avr-robot.
 *
 * stupid-avr-robot is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * stupid-avr-robot is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with stupid-avr-robot.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "RemoteBrowserFrameImpl.h"
#include "res/wxImageGnomeComputer.h"
#include "res/wxImageGnomeNetworkWired.h"
#include "res/wxImageBluetooth.h"
#include "res/wxImageGnomeFolder.h"
#include "res/wxImageGnomeAccessoriesTextEditor.h"

RemoteBrowserFrameImpl::RemoteBrowserFrameImpl() : RemoteBrowserFrame(NULL) {
    m_TreeIcons = new wxImageList(24,24,true,5);
    m_TreeIcons->Add(wxBitmap(wxImageGnomeComputer()));
    m_TreeIcons->Add(wxBitmap(wxImageGnomeNetworkWired()));
    m_TreeIcons->Add(wxBitmap(wxImageBluetooth()));
    m_TreeIcons->Add(wxBitmap(wxImageGnomeFolder()));
    m_TreeIcons->Add(wxBitmap(wxImageGnomeAccessoriesTextEditor()));
    m_treeCtrl5->SetImageList(m_TreeIcons);
    m_TreeRoot = m_treeCtrl5->AddRoot(wxT("Computer"), 0);
    wxTreeItemId serial = m_treeCtrl5->AppendItem(m_TreeRoot, wxT("Serial"), 1);
    wxTreeItemId bluetooth = m_treeCtrl5->AppendItem(m_TreeRoot, wxT("Bluetooth"), 2);
    wxTreeItemId folder1 = m_treeCtrl5->AppendItem(serial, wxT("Arduino Pro Mini"), 3);
    wxTreeItemId folder2 = m_treeCtrl5->AppendItem(bluetooth, wxT("Arduino Pro Mini"), 3);
    m_treeCtrl5->AppendItem(folder1, wxT("Enabled"), 4);
    m_treeCtrl5->AppendItem(folder1, wxT("Mode"), 4);
    m_treeCtrl5->AppendItem(folder2, wxT("Speed"), 4);
    m_treeCtrl5->AppendItem(folder1, wxT("Altitude"), 4);
}

RemoteBrowserFrameImpl::~RemoteBrowserFrameImpl() {
	delete m_TreeIcons;
}
